package com.kid.keep.enums;

import lombok.Getter;

import java.util.Objects;

/**
 * @Description 测评等级
 * @Author JOHN
 * @Create 2019-12-08
 * @Since 1.0.0
 */
public enum GradeEnum {
    NULL(0, "无"),
    PASS(4, "通过");

    @Getter
    private Integer value;
    @Getter
    private String message;


    GradeEnum(Integer value, String message) {
        this.value = value;
        this.message = message;
    }

    public static boolean isPass(Integer value) {
        if (Objects.isNull(value)) {
            return false;
        }
        return PASS.getValue() > value;
    }
}
